package cn.ryh.seataorder.service;

import cn.ryh.apicommons.entities.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @author Rao
 * @Description
 * @create 2022-02-15 9:12
 */
@FeignClient(value = "seata-account")
public interface AccountService {
    /**
     * 扣账户余额
     * @param userId
     * @param money
     * @return
     */
    @PostMapping(value = "/account/decrease")
    CommonResult decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
}
